WP->latitude = -pt2deg(wpt->pt.y);
WP->longitude = pt2deg(wpt->pt.x);
WP->SetCreationTime(unpack_time(wpt->date, wpt->time));
- for (j=WPT_NAME_LEN-1; j >= 0 && wpt->name[j] == ' '; j--) {};
+ for (j=WPT_NAME_LEN-1; j >= 0 && wpt->name[j] == ' '; j--) {}
char *s = xstrndup(wpt->name,j+1);
WP->shortname = s;
xfree(s);
- for (j=WPT_COMMENT_LEN-1; j >= 0 && wpt->comment[j] == ' '; j--) {};
+ for (j=WPT_COMMENT_LEN-1; j >= 0 && wpt->comment[j] == ' '; j--) {}
if (j >= 0) {
char *s = xstrndup(wpt->comment, j+1);
WP->description = s;
route_head* RT = route_head_alloc();
RT->rte_num = i;
- for (j=RTE_NAME_LEN-1; j >= 0 && rte->name[j] == ' '; j--) {};
+ for (j=RTE_NAME_LEN-1; j >= 0 && rte->name[j] == ' '; j--) {}
char *s = xstrndup(rte->name,j+1);
RT->rte_name = s;
xfree(s);
- for (j=RTE_COMMENT_LEN-1; j >= 0 && rte->comment[j] == ' '; j--) {};
+ for (j=RTE_COMMENT_LEN-1; j >= 0 && rte->comment[j] == ' '; j--) {}
if (j >= 0) {
char *s = xstrndup(rte->comment,j+1);
RT->rte_desc = s;
route_head* TL = route_head_alloc();
for (j=TRK_NAME_LEN-1;
j >= 0 && (trkhdr->name[j] == ' ' || trkhdr->name[j] == '\0');
- j--) {};
+ j--) {}
char *s1 = xstrndup(trkhdr->name,j+1);
TL->rte_name = s1;
xfree(s1);
/* TL->rte_name[TRK_NAME_LEN+1] = 0; */ /* MAYBE BAD ADDRESS (Valgrind) */
for (j=TRK_COMMENT_LEN-1;
j >= 0 && (trkhdr->comment[j] == ' ' || trkhdr->comment[j] == '\0');
- j--) {};
+ j--) {}
s1 = xstrndup(trkhdr->comment,j+1);
TL->rte_desc = s1;
xfree(s1);
struct trkhdr* trkhdr = TRL.loghdr.trkhdr;
- for (idx=0; idx< MAXTRK && trkhdr[idx].occupied != TRK_UNUSED; idx++) {};
+ for (idx=0; idx< MAXTRK && trkhdr[idx].occupied != TRK_UNUSED; idx++) {}
if (idx >= MAXTRK) {
fatal(MYNAME ": Can't store more than %u tracklogs", MAXTRK);
}
break;
default:
printf("Unknown tag %x\n", tag);
- ;
}
}
if (!link.url_.isEmpty() || !link.url_link_text_.isEmpty()) {
if (! read_tag("garmin_gpi_read", tag, nullptr)) {
return;
}
- };
+ }
}
double LatF = Lat;
if (LatF>8388608) {
LatF -= 16777216;
- };
+ }
double LonF = Lon;
if (LonF>8388608) {
LonF -= 16777216;
- };
+ }
double AltF = (double)uu * GARMIN_XT_ELE - 1500;
//create new waypoint
static inline QString toString(double d)
{
return QString::number(d, 'f', 9);
-};
+}
static inline QString toString(float f)
{
return QString::number(f, 'f', 6);
-};
+}
/*
QPushButton* formatButton()
{
return ui_.formatButton;
- };
+ }
private:
Ui_AdvUi ui_;
disableDonateDialog_(false),
donateSplashed_(QDateTime(QDate(2010, 1, 1), QTime(0, 0, 0)))
{
- };
+ }
void saveSettings(QSettings& st)
{
const vector <LatLng>& points,
const vector <double>& dists)
{
- encoded_points = "";;
+ encoded_points = "";
int plat = 0;
int plng = 0;
for (unsigned int i = 0; i < points.size(); i++) {
class FilterData
{
public:
- FilterData(): inUse_(true) {};
- virtual ~FilterData() {};
+ FilterData(): inUse_(true) {}
+ virtual ~FilterData() {}
void saveSettings(QSettings& st)
{
class FilterOption
{
public:
- FilterOption() {};
- virtual ~FilterOption() {};
+ FilterOption() {}
+ virtual ~FilterOption() {}
virtual void setWidgetValue() = 0;
virtual void getWidgetValue() = 0;
};
void setValue(QVariant v)
{
value_ = v;
- };
+ }
+
void setSelected(bool v)
{
isSelected_ = v;
- };
+ }
+
QString getHtml() const
{
return html_;
- };
+ }
private:
QString name_;
{
inputOptions_.clear();
outputOptions_.clear();
- };
+ }
Format(const QString& name,
const QString& description,
{
}
- ~Format() {};
+ ~Format() {}
bool isReadWaypoints() const
{
return readWaypoints_;
- };
+ }
+
bool isReadTracks() const
{
return readTracks_;
- };
+ }
+
bool isReadRoutes() const
{
return readRoutes_;
- };
+ }
+
bool isReadSomething() const
{
return isReadWaypoints() || isReadTracks() || isReadRoutes();
- };
+ }
bool isWriteWaypoints() const
{
return writeWaypoints_;
- };
+ }
+
bool isWriteTracks() const
{
return writeTracks_;
- };
+ }
+
bool isWriteRoutes() const
{
return writeRoutes_;
- };
+ }
+
bool isWriteSomething() const
{
return isWriteWaypoints() || isWriteTracks() || isWriteRoutes();
- };
+ }
QString getName() const
{
return name_;
- };
+ }
+
QString getDescription() const
{
return description_;
- };
+ }
+
QString getHtml() const
{
return html_;
- };
+ }
+
QStringList getExtensions() const
{
return extensions_;
- };
+ }
+
const QList<FormatOption>& getInputOptions() const
{
return inputOptions_;
- };
+ }
+
const QList<FormatOption>& getOutputOptions() const
{
return outputOptions_;
- };
+ }
QList<FormatOption>* getInputOptionsRef()
{
return &inputOptions_;
- };
+ }
+
QList<FormatOption>* getOutputOptionsRef()
{
return &outputOptions_;
- };
+ }
bool isDeviceFormat() const
{
return deviceFormat_;
- };
+ }
+
bool isFileFormat() const
{
return fileFormat_;
- };
+ }
bool isHidden() const
{
return hidden_;
- };
+ }
+
void setHidden(bool state)
{
hidden_ = state;
- };
+ }
void saveSettings(QSettings& settings);
void restoreSettings(QSettings& settings);
class FormatLoad
{
public:
- FormatLoad() : currentLine_(0) {};
- ~FormatLoad() {};
+ FormatLoad() : currentLine_(0) {}
+ ~FormatLoad() {}
bool getFormats(QList<Format>& formatList);
private:
{
if (localName == "wpt") {
currentWpt = GpxWaypoint();
- double lat = atts.value("lat").toDouble();;
- double lon = atts.value("lon").toDouble();;
+ double lat = atts.value("lat").toDouble();
+ double lon = atts.value("lon").toDouble();
currentWpt.setLocation(LatLng(lat, lon));
stateStack << state;
state = e_wpt;
else if (localName == "trkpt") {
currentTrkPt = GpxTrackPoint();
- double lat = atts.value("lat").toDouble();;
- double lon = atts.value("lon").toDouble();;
+ double lat = atts.value("lat").toDouble();
+ double lon = atts.value("lon").toDouble();
currentTrkPt.setLocation(LatLng(lat, lon));
stateStack << state;
state = e_trkpt;
else if (localName == "rtept") {
currentRtePt = GpxRoutePoint();
- double lat = atts.value("lat").toDouble();;
- double lon = atts.value("lon").toDouble();;
+ double lat = atts.value("lat").toDouble();
+ double lon = atts.value("lon").toDouble();
currentRtePt.setLocation(LatLng(lat, lon));
stateStack << state;
state = e_rtept;
//localName.toStdString().c_str(), qName.toStdString().c_str());
}
return true;
- };
+ }
bool endElement(const QString& /*namespaceURI*/,
const QString& localName,
//localName.toStdString().c_str(), qName.toStdString().c_str());
}
return true;
- };
+ }
bool characters(const QString& x) override
{
textChars = x;
return true;
- };
+ }
};
class GpxItem
{
public:
- GpxItem(): visible(true) {};
- GpxItem(bool visible): visible(visible) {};
+ GpxItem(): visible(true) {}
+ GpxItem(bool visible): visible(visible) {}
void setVisible(bool b)
{
visible = b;
- };
+ }
+
bool getVisible() const
{
return visible;
- };
+ }
protected:
bool visible;
public:
GpxRoutePoint(): GpxItem(), location(LatLng()), name(QString())
{
- };
+ }
+
void setLocation(const LatLng& pt)
{
location = pt;
- };
+ }
+
LatLng getLocation() const
{
return location;
- };
+ }
void setName(const QString& s)
{
name = s;
- };
+ }
+
QString getName() const
{
return name;
- };
+ }
private:
LatLng location;
class GpxRoute: public GpxItem
{
public:
- GpxRoute(): GpxItem(),name(QString()), cachedLength(-1) {};
+ GpxRoute(): GpxItem(),name(QString()), cachedLength(-1) {}
GpxRoute(const GpxRoute& c)
:GpxItem(c.visible),
void setName(const QString& s)
{
name = s;
- };
+ }
+
QString getName() const
{
return name;
- };
+ }
void clear()
{
routePoints.clear();
- };
+ }
+
void addPoint(const GpxRoutePoint& pt)
{
routePoints << pt;
const QList<GpxRoutePoint>& getRoutePoints() const
{
return routePoints;
- };
+ }
private:
QString name;
public:
GpxTrackPoint(): GpxItem(), location(LatLng()), elevation(0), dateTime(QDateTime())
{
- };
+ }
+
void setLocation(const LatLng& pt)
{
location = pt;
- };
+ }
+
LatLng getLocation() const
{
return location;
- };
+ }
void setElevation(double e)
{
elevation = e;
- };
+ }
+
double getElevation() const
{
return elevation;
- };
+ }
void setDateTime(const QDateTime& dt)
{
dateTime = dt;
- };
+ }
+
QDateTime getDateTime() const
{
return dateTime;
- };
+ }
private:
LatLng location;
class GpxTrackSegment: public GpxItem
{
public:
- GpxTrackSegment() {};
+ GpxTrackSegment() {}
+
GpxTrackSegment(const GpxTrackSegment& c): GpxItem(c.visible)
{
trackPoints.clear();
void clear()
{
trackPoints.clear();
- };
+ }
+
const QList<GpxTrackPoint>& getTrackPoints() const
{
return trackPoints;
- };
+ }
private:
QList <GpxTrackPoint> trackPoints;
class GpxTrack: public GpxItem
{
public:
- GpxTrack(): GpxItem(), number(1), name(QString()), comment(QString()), description(QString()), cachedLength(-1.0) {};
+ GpxTrack(): GpxItem(), number(1), name(QString()), comment(QString()), description(QString()), cachedLength(-1.0) {}
GpxTrack(const GpxTrack& c)
:GpxItem(c.visible),
void setNumber(int n)
{
number = n;
- };
+ }
+
int getNumber() const
{
return number;
- };
+ }
void setName(const QString& s)
{
name = s;
- };
+ }
+
QString getName() const
{
return name;
- };
+ }
void setComment(const QString& s)
{
comment = s;
- };
+ }
+
QString getComment() const
{
return comment;
- };
+ }
void setDescription(const QString& s)
{
description = s;
- };
+ }
+
QString getDescription() const
{
return description;
- };
+ }
void clear()
{
trackSegments.clear();
- };
+ }
+
void addSegment(const GpxTrackSegment& seg)
{
trackSegments << seg;
const QList<GpxTrackSegment>& getTrackSegments() const
{
return trackSegments;
- };
+ }
double length() const
{
comment_(QString()),
description_(QString()),
symbol_(QString())
- {};
+ {}
void setLocation(const LatLng& pt)
{
location_ = pt;
- };
+ }
+
LatLng getLocation() const
{
return location_;
- };
+ }
void setElevation(double e)
{
elevation_ = e;
- };
+ }
+
double getElevation() const
{
return elevation_;
- };
+ }
void setName(const QString& s)
{
name_ = s;
- };
+ }
+
QString getName() const
{
return name_;
- };
+ }
void setComment(const QString& s)
{
comment_ = s;
- };
+ }
+
QString getComment() const
{
return comment_;
- };
+ }
void setDescription(const QString& s)
{
description_ = s;
- };
+ }
+
QString getDescription() const
{
return description_;
- };
+ }
void setSymbol(const QString& s)
{
symbol_ = s;
- };
+ }
+
QString getSymbol() const
{
return symbol_;
- };
+ }
private:
LatLng location_;
class Gpx
{
public:
- Gpx() {};
+ Gpx() {}
bool read(const QString& fileName);
QList <GpxWaypoint>& getWaypoints()
{
return wayPoints;
- }; // nonconst
+ } // nonconst
+
QList <GpxTrack>& getTracks()
{
return tracks;
- };
+ }
+
QList <GpxRoute>& getRoutes()
{
return routes;
- };
+ }
const QList <GpxWaypoint>& getWaypoints() const
{
return wayPoints;
- };
+ }
+
const QList <GpxTrack>& getTracks() const
{
return tracks;
- };
+ }
+
const QList <GpxRoute>& getRoutes() const
{
return routes;
- };
+ }
private:
QList <GpxWaypoint> wayPoints;
QStringList extensions = formatList_[i].getExtensions();
for (int j = 0; j < extensions.size(); ++j) {
if (extensions[j] == ext) {
- return formatList_[i].getName();;
+ return formatList_[i].getName();
}
}
}
Q_OBJECT
public:
- MarkerClicker(QObject* parent): QObject(parent) {};
+ MarkerClicker(QObject* parent): QObject(parent) {}
public slots:
void clickedX(int t, int i)
bool ProcessWaitDialog::getExitedNormally()
{
return (errorString_.length() == 0);
-};
+}
//------------------------------------------------------------------------
QString ProcessWaitDialog::getErrorString()
{
return errorString_;
-};
+}
//------------------------------------------------------------------------
int ProcessWaitDialog::getExitCode()
{
return ecode_;
-};
+}
//------------------------------------------------------------------------
void ProcessWaitDialog::stopClickedX()
{
process_->terminate();
-};
+}
+
//------------------------------------------------------------------------
void ProcessWaitDialog::timeoutX()
{
timer_->stop();
accept();
}
-};
+}
//------------------------------------------------------------------------
void ProcessWaitDialog::errorX(QProcess::ProcessError err)
errorString_ = processErrorString(err);
timer_->stop();
accept();
-};
+}
//------------------------------------------------------------------------
void ProcessWaitDialog::finishedX(int exitCode, QProcess::ExitStatus es)
}
timer_->stop();
accept();
-};
+}
//------------------------------------------------------------------------
{
QByteArray d = process_->readAllStandardError();
appendToText(d.data());
-};
+}
//------------------------------------------------------------------------
void ProcessWaitDialog::readyReadStandardOutputX()
{
QByteArray d = process_->readAllStandardOutput();
appendToText(d.data());
-};
+}
void ProcessWaitDialog::closeEvent(QCloseEvent* event)
{
event->ignore();
-};
+}
QString getOutputString() const
{
return outputString_;
- };
+ }
protected:
void closeEvent(QCloseEvent* event);
class VarSetting
{
public:
- VarSetting() {};
- virtual ~VarSetting() {};
+ VarSetting() {}
+ virtual ~VarSetting() {}
virtual void saveSetting(QSettings&) = 0;
virtual void restoreSetting(QSettings&) = 0;
}
}
- GPS_Util_Put_Short(p, (US) way->category);; /* D110 category */
+ GPS_Util_Put_Short(p, (US) way->category); /* D110 category */
p += 2;
}
tio.DCBlength = sizeof(DCB);
GetCommState(wsd->comport, &tio);
- tio.BaudRate = speed;;
+ tio.BaudRate = speed;
if (!SetCommState(wsd->comport, &tio)) {
GPS_Serial_Error("SetCommState on port for alternate bit rate failed");
CloseHandle(wsd->comport);
if ((rv == 0) && (receive_state == rs_frombulk)) {
m1= "RET2INTR";
m2=nullptr;
- };
+ }
GPS_Diag("(%-8s%s)\n", m1, m2 ? m2 : "");
}
} break;
default:
break;
- ;
}
}
}
line_width(-1),
session(curr_session())
{
-};
+}
route_head::~route_head()
{
};
-}; // namespace gpsbabel
+} // namespace gpsbabel
#endif // SRC_CORE_FILE_INCLUDED_H_
codec_ = nullptr;
}
-}; // namespace
+} // namespace
QTextCodec* codec_{nullptr};
};
-}; // namespace
+} // namespace
default:
break;
- };
+ }
readnext:
// readNextStartElement will cause a "Premature end of document." error